{{set . "title" "添加分类"}}
{{append . "moreStyles" "css/admin/admin-category.css"}}
{{append . "moreScripts" "js/admin/admin-category.js"}}
{{template "Layout/AdminHeader.html" .}}
<div class="main admin-user">
  <h2 class="page-header title">{{.title}}</h2>
  <div>
      <div class="input-area form-group">
          <label for="">分类名称</label>
          <input id="ca-name" type="text" class="form-control" value="{{.category.Name}}">
      </div>
      <div class="input-area form-group">
          <label for="">分类标识</label>
          <input id="ca-ident" type="text" class="form-control" value="{{.category.Ident}}">
          <div class="message"></div>
      </div>
      <!--<div class="input-area form-group">
          <label for="">父级分类</label>
          <select id="p-ca" class="form-control">
              <option value="0">无</option>
              {{range .allcategorys}}
                <option value="{{.Id}}">{{.Name}}</option>
              {{end}}
          </select>
      </div>-->
      <div class="input-area form-group">
          <label for="">分类描述</label>
          <textarea id="ca-desc" name="" cols="30" rows="10" class="form-control">{{.category.Desc}}</textarea>
      </div>
  </div>
  <div>
      <input type="hidden" id="ca-id" value="{{.category.Id}}">
      <button class="btn btn-sm btn-primary" onclick="CategoryArea.save()">保存</button>
  </div>
</div>  
{{template "Layout/AdminFooter.html" .}}